package com.CGFrame.struts.bean.category;

import java.util.List;

import com.CGFrame.struts.bean.ProjectOperate;
import com.CGFrame.struts.bean.ProjectOperateFactory;

public class Catemodelrelbean {
	private static ThreadLocal<ProjectOperate> tl=new ThreadLocal<ProjectOperate>();
	
	{
		tl.set(ProjectOperateFactory.getprojectOperate());
	}
	public void delCateModelRel(int id){
		ProjectOperate pop=tl.get();
		pop.deleteObject("Catemodelrel",id);
	}
	
	public List getRelationsByModelId(String modelId){
		ProjectOperate pop=tl.get();
		List list=pop.Query("Catemodelrel","catemodel,"+modelId,"cateModelRelId","Asc");
		return list;
	}
	
}
